<%@ page language="java"  pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>treatment</title>
	<script src=" ../../js/jquery-3.3.1.js"   type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" href="../../css/bootstrap.css" type="text/css" />
	<script src="../../js/bootstrap.js" type="text/javascript" charset="utf-8"></script>
	<style>
		* {
			margin: 0 auto;
			padding: 0;
		}
	
		#a {
			width: 1000px;
			height: 800px;
			background-image: url(../../img/2.jpg);
			background-size: 100% 100%;
			background-repeat: no-repeat;
		}
		#b{
			display: inline-block;
			width: 250px;
			height: 600px;
			color: white;
			text-align:left;
			margin-top: 20px;
			margin-left: 350px;
		}
		h1{
			color: white;
			display: inline-block;
			margin-top: 200px;
			margin-left: 350px;
			text-align: center;
			font-weight: 500;
			letter-spacing:50px;
		}
		.form-group{
			width: 100%;
		}
		select,option,textarea{
			color: #000000;
		}
		button{
			display: inline-block;
			margin-top: 10px;
			margin-left: 250px;
		}
		input{
			color: black;
		}
		</style>
    <script language="JavaScript" type="text/javascript">
        var doc=[
         ["张无忌"],
         ["刘德华","张国荣"],
         ["王祖贤","令狐冲"],
         ["张曼玉","郭富城","风清扬"]
        ];
        function f1(){
            var ks = document.getElementById("ks");
            var doctor = document.getElementById("doctor");
            var ksdoc = doc[ks.selectedIndex - 1];
            doctor.length=1;
            for (let i = 0; i <ksdoc.length; i++) {
                doctor[i+1]=new Option(ksdoc[i],ksdoc[i]);
            }



        }
    </script>
</head>
<body>
  <div id="a">
  		
     <h1>门诊挂号</h1>
  <div id="b">
      <form action="/user/treatment" method="post">
  		<div class="radio">
  		  <label>
  		    <input type="radio" name="have"  value="已有就诊卡" checked>已有就诊卡
  		  </label>
  		  <label>
  		    <input type="radio" name="have"  value="新建就诊卡">
  		    新建就诊卡
  		  </label>
  		</div>
  		<div class="form-group">
  			<label for="idCard">身份证号</label>
  			<input type="text" name="idCard" class="form-group" id="idCard">
  		</div>
  		<div class="form-group">
  			<label for="name">姓名</label>
  			<input type="text" name="name" class="form-group" id="name">
  		</div>
  		<div class="form-group">
  			<label for="age">年龄</label>
  			<input type="text" name="age" class="form-group" id="age">
  		</div>
  		<div class="select">
  			<label for="gender">
  				性别：<select name="gender" id="gender">
  				     <option value="女" selected>女</option>
  				    <option value="男">男</option>
  				    </select>
  			</label>
  		</div>
  		<div class="select">
  			<label for="ks">
  				挂号科室：<select id="ks" onchange="f1()">
  				         <option>--请选择科室--</option>
  				         <option value="内科">内科</option>
  				         <option value="外科">外科</option>
  				         <option value="妇科">妇科</option>
  				         <option value="儿科">儿科</option>
  				         </select>
  			</label>
  		</div>
  		<div class="select">
  			<label for="doctor">
  				挂号医生：<select id="doctor">
  				         <option>--请选择医生--</option>
  				         </select>
  			</label>
  		</div>
          <div class="textarea">
  			<label for="content">
  				特殊说明：<textarea id="content"></textarea>
  			</label>
  		</div>
          <button type="submit" class="btn btn-default">确认</button>
      </form>
  	</div>
  	</div>
  
</body>
</html>